package com.corpgovernment.common.enums;

import lombok.Getter;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;


/**
 * 核验枚举类
 */
public enum VerifyPushEnum {

	ACCOUNT_TICKETING("Account", "Ticketing", "账户出票核验");

	@Getter
	private String type;
	@Getter
	private String scene;
	@Getter
	private String desc;

	private static final Map<String, VerifyPushEnum> lookup = new HashMap<>();

	static {
		for (VerifyPushEnum s : EnumSet.allOf(VerifyPushEnum.class)) {
			lookup.put(s.getType() + s.getScene(), s);
		}
	}

	VerifyPushEnum(String type, String scene, String desc) {
		this.type = type;
		this.scene = scene;
		this.desc = desc;
	}

	public static VerifyPushEnum get(String key) {
		return lookup.get(key);
	}

	public static boolean exists(String key) {
		return lookup.containsKey(key);
	}

}